package com.maxd.modules.antPlant.api.resp;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author mengshx
 * datetime 2024-04-14 09:41
 **/

@Getter
@Setter
public class OtherOrderQueryResp {
    @JsonProperty("message")
    private String message;
    @JsonProperty("status_code")
    private Integer statusCode;
    private Data data;

    @Getter
    @Setter
    public static class Data {
        @JsonProperty("data")
        private List<DataItem> data;

        @Getter
        @Setter
        public static class DataItem {
            @JsonProperty("id")
            private String id;
            @JsonProperty("pf_type")
            private Integer pfType;

            public String getTypeName() {
                String result;
                switch (pfType) {
                    case 1:
                        result = "京东";
                        break;
                    case 2:
                        result = "拼多多";
                        break;
                    case 3:
                        result = "淘宝";
                        break;
                    case 6:
                        result = "唯品会";
                        break;
                    case 7:
                        result = "美团分销联盟";
                        break;
                    case 13:
                        result = "美团联盟";
                        break;
                    case 14:
                        result = "其他";
                        break;
                    case 15:
                        result = "快手";
                        break;
                    case 30:
                        result = "饿了么";
                        break;
                    case 31:
                        result = "滴滴";
                        break;
                    case 32:
                        result = "吃喝玩乐周边";
                        break;
                    case 34:
                        result = "流量卡";
                        break;
                    default:
                        result = "未知";
                        break;
                }
                return result;
            }

            @JsonProperty("extend_id")
            private String extendId;
            @JsonProperty("parentid")
            private String parentid;
            @JsonProperty("orderid")
            private String orderid;
            @JsonProperty("ordertime")
            private Integer ordertime;
            @JsonProperty("finishtime")
            private Integer finishtime;
            @JsonProperty("goods_id")
            private String goodsId;
            @JsonProperty("goods_name")
            private String goodsName;
            @JsonProperty("picurl")
            private String picurl;
            @JsonProperty("goods_num")
            private String goodsNum;
            @JsonProperty("cosprice")
            private Integer cosprice;
            @JsonProperty("commission")
            private Integer commission;
            @JsonProperty("commissionrate")
            private Integer commissionrate;
            @JsonProperty("valistatus")
            private String valistatus;
            @JsonProperty("validcode")
            private String validcode;
            @JsonProperty("yn")
            private Integer yn;
            @JsonProperty("isbalance")
            private Integer isbalance;
        }

        @JsonProperty("total")
        private Integer total;
    }
}
